<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QDomNamedNodeMap Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QDomNamedNodeMap Class Reference<br /><sup><sup>[<a href="qtxml.html">QtXml</a> module]</sup></sup></h1><p>The QDomNamedNodeMap class contains a collection of nodes that
can be accessed by name. <a href="#details">More...</a></p>

<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qdomnamednodemap.html#QDomNamedNodeMap">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdomnamednodemap.html#QDomNamedNodeMap-2">__init__</a></b> (<i>self</i>, QDomNamedNodeMap)</li><li><div class="fn" />bool <b><a href="qdomnamednodemap.html#contains">contains</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li><li><div class="fn" />int <b><a href="qdomnamednodemap.html#count">count</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnamednodemap.html#isEmpty">isEmpty</a></b> (<i>self</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnamednodemap.html#item">item</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />int <b><a href="qdomnamednodemap.html#length">length</a></b> (<i>self</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnamednodemap.html#namedItem">namedItem</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnamednodemap.html#namedItemNS">namedItemNS</a></b> (<i>self</i>, QString&#160;<i>nsURI</i>, QString&#160;<i>localName</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnamednodemap.html#removeNamedItem">removeNamedItem</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnamednodemap.html#removeNamedItemNS">removeNamedItemNS</a></b> (<i>self</i>, QString&#160;<i>nsURI</i>, QString&#160;<i>localName</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnamednodemap.html#setNamedItem">setNamedItem</a></b> (<i>self</i>, QDomNode&#160;<i>newNode</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnamednodemap.html#setNamedItemNS">setNamedItemNS</a></b> (<i>self</i>, QDomNode&#160;<i>newNode</i>)</li><li><div class="fn" />int <b><a href="qdomnamednodemap.html#size">size</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qdomnamednodemap.html#__eq__">__eq__</a></b> (<i>self</i>, QDomNamedNodeMap)</li><li><div class="fn" /> <b><a href="qdomnamednodemap.html#__len__">__len__</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnamednodemap.html#__ne__">__ne__</a></b> (<i>self</i>, QDomNamedNodeMap)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QDomNamedNodeMap class contains a collection of nodes that
can be accessed by name.</p>
<p>Note that QDomNamedNodeMap does not inherit from <a href="qdomnodelist.html">QDomNodeList</a>. QDomNamedNodeMaps do not
provide any specific node ordering. Although nodes in a
QDomNamedNodeMap may be accessed by an ordinal index, this is
simply to allow a convenient enumeration of the contents of a
QDomNamedNodeMap, and does not imply that the DOM specifies an
ordering of the nodes.</p>
<p>The QDomNamedNodeMap is used in three places:</p>
<ol class="1">
<li><a href="qdomdocumenttype.html#entities">QDomDocumentType.entities</a>()
returns a map of all entities described in the DTD.</li>
<li><a href="qdomdocumenttype.html#notations">QDomDocumentType.notations</a>()
returns a map of all notations described in the DTD.</li>
<li><a href="qdomnode.html#attributes">QDomNode.attributes</a>()
returns a map of all attributes of an element.</li>
</ol>
<p>Items in the map are identified by the name which
QDomNode.name() returns. Nodes are retrieved using <a href="qdomnamednodemap.html#namedItem">namedItem</a>(), <a href="qdomnamednodemap.html#namedItemNS">namedItemNS</a>() or <a href="qdomnamednodemap.html#item">item</a>(). New nodes are inserted
with <a href="qdomnamednodemap.html#setNamedItem">setNamedItem</a>() or <a href="qdomnamednodemap.html#setNamedItemNS">setNamedItemNS</a>() and
removed with <a href="qdomnamednodemap.html#removeNamedItem">removeNamedItem</a>() or
<a href="qdomnamednodemap.html#removeNamedItemNS">removeNamedItemNS</a>().
Use <a href="qdomnamednodemap.html#contains">contains</a>() to see
if an item with the given name is in the named node map. The number
of items is returned by <a href="qdomnamednodemap.html#length">length</a>().</p>
<p>Terminology: in this class we use "item" and "node"
interchangeably.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QDomNamedNodeMap" />QDomNamedNodeMap.__init__ (<i>self</i>)</h3><p>Constructs an empty named node map.</p>


<h3 class="fn"><a name="QDomNamedNodeMap-2" />QDomNamedNodeMap.__init__ (<i>self</i>, <a href="qdomnamednodemap.html">QDomNamedNodeMap</a>)</h3><p>Constructs a copy of <i>n</i>.</p>


<h3 class="fn"><a name="contains" />bool QDomNamedNodeMap.contains (<i>self</i>, QString&#160;<i>name</i>)</h3><p>Returns true if the map contains a node called <i>name</i>;
otherwise returns false.</p>
<p><b>Note:</b> This function does not take the presence of
namespaces into account. Use <a href="qdomnamednodemap.html#namedItemNS">namedItemNS</a>() to test
whether the map contains a node with a specific namespace URI and
name.</p>


<h3 class="fn"><a name="count" />int QDomNamedNodeMap.count (<i>self</i>)</h3><p>This function is provided for Qt API consistency. It is
equivalent to <a href="qdomnamednodemap.html#length">length</a>().</p>


<h3 class="fn"><a name="isEmpty" />bool QDomNamedNodeMap.isEmpty (<i>self</i>)</h3><p>Returns true if the map is empty; otherwise returns false. This
function is provided for Qt API consistency.</p>


<h3 class="fn"><a name="item" /><a href="qdomnode.html">QDomNode</a> QDomNamedNodeMap.item (<i>self</i>, int&#160;<i>index</i>)</h3><p>Retrieves the node at position <i>index</i>.</p>
<p>This can be used to iterate over the map. Note that the nodes in
the map are ordered arbitrarily.</p>
<p><b>See also</b> <a href="qdomnamednodemap.html#length">length</a>().</p>


<h3 class="fn"><a name="length" />int QDomNamedNodeMap.length (<i>self</i>)</h3><p>Returns the number of nodes in the map.</p>
<p><b>See also</b> <a href="qdomnamednodemap.html#item">item</a>().</p>


<h3 class="fn"><a name="namedItem" /><a href="qdomnode.html">QDomNode</a> QDomNamedNodeMap.namedItem (<i>self</i>, QString&#160;<i>name</i>)</h3><p>Returns the node called <i>name</i>.</p>
<p>If the named node map does not contain such a node, a <a href="qdomnode.html#isNull">null node</a> is returned. A node's name is
the name returned by <a href="qdomnode.html#nodeName">QDomNode.nodeName</a>().</p>
<p><b>See also</b> <a href="qdomnamednodemap.html#setNamedItem">setNamedItem</a>() and
<a href="qdomnamednodemap.html#namedItemNS">namedItemNS</a>().</p>


<h3 class="fn"><a name="namedItemNS" /><a href="qdomnode.html">QDomNode</a> QDomNamedNodeMap.namedItemNS (<i>self</i>, QString&#160;<i>nsURI</i>, QString&#160;<i>localName</i>)</h3><p>Returns the node associated with the local name <i>localName</i>
and the namespace URI <i>nsURI</i>.</p>
<p>If the map does not contain such a node, a <a href="qdomnode.html#isNull">null node</a> is returned.</p>
<p><b>See also</b> <a href="qdomnamednodemap.html#setNamedItemNS">setNamedItemNS</a>() and
<a href="qdomnamednodemap.html#namedItem">namedItem</a>().</p>


<h3 class="fn"><a name="removeNamedItem" /><a href="qdomnode.html">QDomNode</a> QDomNamedNodeMap.removeNamedItem (<i>self</i>, QString&#160;<i>name</i>)</h3><p>Removes the node called <i>name</i> from the map.</p>
<p>The function returns the removed node or a <a href="qdomnode.html#isNull">null node</a> if the map did not contain a
node called <i>name</i>.</p>
<p><b>See also</b> <a href="qdomnamednodemap.html#setNamedItem">setNamedItem</a>(), <a href="qdomnamednodemap.html#namedItem">namedItem</a>(), and <a href="qdomnamednodemap.html#removeNamedItemNS">removeNamedItemNS</a>().</p>


<h3 class="fn"><a name="removeNamedItemNS" /><a href="qdomnode.html">QDomNode</a> QDomNamedNodeMap.removeNamedItemNS (<i>self</i>, QString&#160;<i>nsURI</i>, QString&#160;<i>localName</i>)</h3><p>Removes the node with the local name <i>localName</i> and the
namespace URI <i>nsURI</i> from the map.</p>
<p>The function returns the removed node or a <a href="qdomnode.html#isNull">null node</a> if the map did not contain a
node with the local name <i>localName</i> and the namespace URI
<i>nsURI</i>.</p>
<p><b>See also</b> <a href="qdomnamednodemap.html#setNamedItemNS">setNamedItemNS</a>(),
<a href="qdomnamednodemap.html#namedItemNS">namedItemNS</a>(), and
<a href="qdomnamednodemap.html#removeNamedItem">removeNamedItem</a>().</p>


<h3 class="fn"><a name="setNamedItem" /><a href="qdomnode.html">QDomNode</a> QDomNamedNodeMap.setNamedItem (<i>self</i>, <a href="qdomnode.html">QDomNode</a>&#160;<i>newNode</i>)</h3><p>Inserts the node <i>newNode</i> into the named node map. The
name used by the map is the node name of <i>newNode</i> as returned
by <a href="qdomnode.html#nodeName">QDomNode.nodeName</a>().</p>
<p>If the new node replaces an existing node, i.e. the map contains
a node with the same name, the replaced node is returned.</p>
<p><b>See also</b> <a href="qdomnamednodemap.html#namedItem">namedItem</a>(), <a href="qdomnamednodemap.html#removeNamedItem">removeNamedItem</a>(), and
<a href="qdomnamednodemap.html#setNamedItemNS">setNamedItemNS</a>().</p>


<h3 class="fn"><a name="setNamedItemNS" /><a href="qdomnode.html">QDomNode</a> QDomNamedNodeMap.setNamedItemNS (<i>self</i>, <a href="qdomnode.html">QDomNode</a>&#160;<i>newNode</i>)</h3><p>Inserts the node <i>newNode</i> in the map. If a node with the
same namespace URI and the same local name already exists in the
map, it is replaced by <i>newNode</i>. If the new node replaces an
existing node, the replaced node is returned.</p>
<p><b>See also</b> <a href="qdomnamednodemap.html#namedItemNS">namedItemNS</a>(), <a href="qdomnamednodemap.html#removeNamedItemNS">removeNamedItemNS</a>(),
and <a href="qdomnamednodemap.html#setNamedItem">setNamedItem</a>().</p>


<h3 class="fn"><a name="size" />int QDomNamedNodeMap.size (<i>self</i>)</h3><p>This function is provided for Qt API consistency. It is
equivalent to <a href="qdomnamednodemap.html#length">length</a>().</p>


<h3 class="fn"><a name="__eq__" />bool QDomNamedNodeMap.__eq__ (<i>self</i>, <a href="qdomnamednodemap.html">QDomNamedNodeMap</a>)</h3><h3 class="fn"><a name="__len__" /> QDomNamedNodeMap.__len__ (<i>self</i>)</h3><h3 class="fn"><a name="__ne__" />bool QDomNamedNodeMap.__ne__ (<i>self</i>, <a href="qdomnamednodemap.html">QDomNamedNodeMap</a>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;snapshot-4.9.5-9eb6aac99275 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.3</td></tr></table></div></address></body></html>